/*
 *
 *  File: 'boggle.cpp'
 *
 *  Author: Samip Shah <samipshah@alumni.cmu.edu>
 *  Date: Sep 09, 2011
 *
 */

#include <boggle.h>
#include <time.h>
#define SIZE 4
int main(int argc, char** argv) 
{
	char board[SIZE][SIZE] = { {'n', 'w' ,'l', 'r'},
				   {'b', 'b', 'm', 'q'},
				   {'b', 'h', 'c', 'd'},
				   {'a', 'r', 'z', 'o'}};

	std::string str[3] = { "doc",
				"doz",
				"bar"
				};
	int ans[3];
	char** temp = new char*[SIZE];
	temp[0] = & board[0][0];
	temp[1] = & board[1][0];
	temp[2] = & board[2][0];
	temp[3] = & board[3][0];

	Boggle game;
	game.loadBoard(temp, SIZE, SIZE);
	game.printBoard();
	game.checkAnswers(str, 3, &ans[0]);
	for(int i = 0 ; i < 3 ; i++ ) {
		std::cout << str[i] << "-" << ans[i] << std::endl;
	}

  std::cout << "----------" << std::endl;
  char b[SIZE][SIZE];
  game.generateBoard(&b[0][0], SIZE, SIZE);
  for(int i=0; i < SIZE; i++) {
    for(int j=0; j < SIZE; j++) {
      std::cout << b[i][j] << " ";
    }
    std::cout << std::endl;
  }

  time_t t = time(NULL);
  printf("%d time %d\n", (int)sizeof(t), (int)t);
}
